home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / aie8911.zip / ARITY5.ARI < prev    next >
Text File  |  1989-08-22  |  4KB  |  102 lines

  1.  
  2.  
  3. %%%%%%%%%%%%%%%%%%%%%% end genned decs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4.  
  5. :- extrn monitor / 1 : interp.
  6. :- extrn graphics_card / 1 : interp.
  7.  
  8. %%%%%%%%%%%%%%%%%%%%%% end hand coded decs %%%%%%%%%%%%%%%%%%%%%%%%%
  9.  
  10.  
  11. %%%%%%%%%%%%%%%%%%% start of code after headers %%%%%%%%%%%%%%%%%%%%
  12.  
  13. %%%%%%%%%%%%%% list_to_text %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  14.  
  15.  
  16. list_to_text( List, String ) :-
  17.       list_text( List, String).
  18.  
  19.  
  20. %%%%%%%%%%%%%% get_cfg_file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  21.  
  22. get_cfg_file :-
  23.     reconsult_if_there($conman.cfg$).
  24.  
  25. %%%%%%%%%%%%%%%%%%%%%% cursor control predicates %%%%%%%%%%%%%%%%%%%
  26. %%%%%%%%%%%%%%%%%%%%%% cursor control predicates %%%%%%%%%%%%%%%%%%%
  27. %%%%%%%%%%%%%%%%%%%%%% cursor control predicates %%%%%%%%%%%%%%%%%%%
  28.  
  29. /************** cursor boundaries *************************************/
  30. /* These are cursor scan line boundaries.  Scan lines are numbered from
  31.    0 starting at the top of a char. box.  The number of scan lines in
  32.    a character box is hardware dependent.  Therefore we access the
  33.    facts in conman.cfg to determine the scan lines that we need.
  34. */
  35. %                 cursor        cursor  display   graphics card    scan
  36. %                 type          side    type      type             line #
  37. cursor_scan_line( normal,       top,    mono,     mono,            11) :- !.
  38. cursor_scan_line( normal,       bottom, mono,     mono,            13) :- !.
  39. cursor_scan_line( invisible,    top,    mono,     mono,            14) :- !.
  40. cursor_scan_line( invisible,    bottom, mono,     mono,            10) :- !.
  41.  
  42. cursor_scan_line( normal,       top,    _   , _   , 11).
  43. cursor_scan_line( normal,       bottom, _   , _   , 13).
  44. cursor_scan_line( invisible,    top,    _   , _   , 14).
  45. cursor_scan_line( invisible,    bottom, _   , _   , 10).
  46.  
  47. :- mode set_cursor( + ) .
  48.  
  49. set_cursor( Cursor_type) :-
  50.       call( monitor( Monitor)),
  51.       call( graphics_card( Card)),
  52.       cursor_scan_line( Cursor_type,
  53.                         top,
  54.                         Display_type,
  55.                         Card_type ,
  56.                         Top_scan_line),
  57.       cursor_scan_line( Cursor_type,
  58.                         bottom,
  59.                         Display_type,
  60.                         Card_type ,
  61.                         Bottom_scan_line),
  62.       set_cursor( Top_scan_line, Bottom_scan_line),
  63.       !.
  64. set_cursor( _          ) .
  65.  
  66.  
  67.  
  68. hide_cursor :-
  69.      set_cursor(invisible).
  70.  
  71. restore_cursor :-
  72.      set_cursor(normal   ).
  73.  
  74. %%%%%%%%%%%%%%%%%% end cursor control predicates %%%%%%%%%%%%%%%%%%%
  75. %%%%%%%%%%%%%%%%%% end cursor control predicates %%%%%%%%%%%%%%%%%%%
  76. %%%%%%%%%%%%%%%%%% end cursor control predicates %%%%%%%%%%%%%%%%%%%
  77.  
  78. %%%%%%%%%%%%%%%%%%  garbage collection  %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  79. %%%%%%%%%%%%%%%%%%  garbage collection  %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  80. %%%%%%%%%%%%%%%%%%  garbage collection  %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  81.  
  82. garbage_collection :-
  83.     gc.
  84.  
  85. %%%%%%%%%%% case insensitive string search %%%%%%%%%%%%%%%%%%%%%%%%%
  86. %%%%%%%%%%% case insensitive string search %%%%%%%%%%%%%%%%%%%%%%%%%
  87. %%%%%%%%%%% case insensitive string search %%%%%%%%%%%%%%%%%%%%%%%%%
  88.  
  89. :- mode case_insensitive_string_search( +, +, - ).
  90.  
  91. case_insensitive_string_search( Substring, Main_string, Location) :-
  92.                  string_search( 1, Substring, Main_string, Location).
  93.  
  94.  
  95. anchored_case_insensitive_string_search( Substring, Main_string) :-
  96.                  string_search( 1, Substring, Main_string, 0       ).
  97.  
  98.  
  99. %%%%%%%%%%%%%%%%%%  eof  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  100. %%%%%%%%%%%%%%%%%%  eof  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  101. %%%%%%%%%%%%%%%%%%  eof  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  102.